#include <stdio.h>
#include <stdlib.h>

int main () {
    int n=0;
    scanf ("%d",&n);

    unsigned int ** mas;
    mas=(unsigned int **) malloc (n * sizeof (unsigned int *));
    for (int i=0; i<n; i++) {
        mas[i]=(unsigned int *) malloc (n * sizeof (unsigned int));
    }

    for (int i=0; i<n; i++) {
        for (int j=0; j<n; j++) {
            scanf ("%u",&mas[i][j]);
        }
    }

    for (int i=0; i<n; i++) {
        for (int j=0; j<n; j++) {
            printf ("%u ",mas[j][i]);
        }
        printf("\n");
    }

    return 0;
}
